package com.gitee.qdbp.jdbc.test.condition;

import java.io.Serializable;
import com.gitee.qdbp.able.jdbc.base.WhereCondition;
import com.gitee.qdbp.tools.utils.VerifyTools;

/**
 * 部门隔离WHERE条件
 *
 * @author zhaohuihua
 * @version 20201113
 */
public class DeptIsolationWhere implements WhereCondition, Serializable {

    /** serialVersionUID **/
    private static final long serialVersionUID = 1L;

    /** 用户隔离字段 **/
    private String userField;
    /** 代办人隔离字段 **/
    private String agentField;
    /** 部门隔离字段 **/
    private String deptField;

    public DeptIsolationWhere() {
    }

    public DeptIsolationWhere(String deptField) {
        this.deptField = deptField;
    }

    public DeptIsolationWhere(String userField, String deptField) {
        this.userField = userField;
        this.deptField = deptField;
    }

    public DeptIsolationWhere(String userField, String agentField, String deptField) {
        this.userField = userField;
        this.agentField = agentField;
        this.deptField = deptField;
    }

    /** 用户隔离字段 **/
    public String getUserField() {
        return userField;
    }

    /** 用户隔离字段 **/
    public void setUserField(String userField) {
        this.userField = userField;
    }

    /** 代办人隔离字段 **/
    public String getAgentField() {
        return agentField;
    }

    /** 代办人隔离字段 **/
    public void setAgentField(String agentField) {
        this.agentField = agentField;
    }

    /** 部门隔离字段 **/
    public String getDeptField() {
        return deptField;
    }

    /** 部门隔离字段 **/
    public void setDeptField(String deptField) {
        this.deptField = deptField;
    }

    @Override
    public boolean isEmpty() {
        return VerifyTools.isAllBlank(deptField, userField, agentField);
    }

}
